dojo.provide("miaigo.model.sgf.properties.Real");

dojo.require("miaigo.model.sgf.SGFProperty");

/* Properties handled:
 *   BL, KM, TM, V, WL
 * Currently handled:
 *   KM
 */

dojo.declare(
    "miaigo.model.sgf.properties.Real",
    [miaigo.model.sgf.SGFProperty],
    {
	onApply: function(game)
	{
	    switch (this.getID())
	    {
	    case "KM":
		game.setInfo("komi", this.getValue());
		break;
	    }
	},

	getValue: function(/*integer (optional)*/index)
	{
	    var value = this.getRawValue(index);
	    return new Number(value);
	}
    });